﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<DomainModel.Entities.Track>>" %>

<table>
    <tr>
        <th>
        </th>      
        <th>
            Track Name
        </th>        
    </tr>
    <% foreach (var item in Model)
       { %>
    <tr>
        <td>
            <%: Html.ActionLink("Details", "Details","Track", new { id=item.TrackID },null) %> |
            <%: Html.ActionLink("Edit", "Edit","Track", new { id=item.TrackID },null) %> |           
            <%: Html.ActionLink("Delete", "Delete","Track", new { id=item.TrackID },null) %> |
        </td>        
        <td>
            <%: item.TrackName %>
        </td>
       
    </tr>
    <% } %>
</table>
<p>
<%if (ViewData["AlbumID"] != null)
  {%>
    <%: Html.ActionLink("Create New Track", "Create", "Track", new { id = ViewData["AlbumID"] }, null)%>  
 <% } %>
    
</p>